/* 
 * File:   JWorkerThread.h
 * Author: johnneyshi
 *
 * Created on 2013年3月6日, 上午10:25
 */

#ifndef JWORKERTHREAD_H
#define	JWORKERTHREAD_H
#include "JServerWorker.h"
#include "JDefine.h"

class JServerWorker;


class JWorkerThread
{
public:
    JWorkerThread(JServerWorker* _w,bool _isPermanent);
    virtual ~JWorkerThread();
    void Start();
    void GetClientFd();
private:
    JServerWorker* pWorker;
protected:
    int clientFd;
    virtual void DealMsg();
private:
    //这些是在while中要用到的，位了避免频繁分配内存
    char buff[BUFF_SIZE];
    int n;
    bool isPermanent;

};

#endif	/* JWORKERTHREAD_H */

